<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/tld/struts-bean" prefix="bean"%> 
<%@ taglib uri="/WEB-INF/tld/struts-html" prefix="html"%>
<%@ taglib uri="/WEB-INF/tld/struts-logic" prefix="logic" %>
<%@ taglib uri="/WEB-INF/tld/jstl/c" prefix="c" %>
<%@ taglib uri="/WEB-INF/tld/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="/WEB-INF/tld/jstl/fn" prefix="fn" %>
<%@ taglib uri="/WEB-INF/tld/FCKeditor" prefix="FCK" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html:html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="ebb365,ebb365,ebb365">
<meta http-equiv="description" content="ebb365">
<title>新闻添加</title>
<link rel="stylesheet" type="text/css" href="/admin/css/css.css">
<script type='text/javascript' src='/dwr/interface/newsClass.js'></script>
<script type='text/javascript' src='/dwr/engine.js'></script>
<script type='text/javascript' src='/dwr/util.js'></script>
<script type="text/javascript">
 function getAllBigNewsClass() {
    newsClass.getAllNewsBclass();
 }
 
 function getAllSmallNewsClassByBigNewsClassId(bigID){
    newsClass.getAllNewsSclassByNewsBclassId(bigID,smallNewsClass);
 }

 function smallNewsClass(smallList){
     DWRUtil.removeAllOptions("smallclassid");
     DWRUtil.addOptions("smallclassid", smallList);   
 }
 
 function getBigNewsClassSelected(selectObj){
       for(var i = 0; i < selectObj.options.length; i++){
	       if (selectObj.options[i].selected){
	         var id = selectObj.options[i].value;
	          getAllSmallNewsClassByBigNewsClassId(id);
	       }
       }
 }
</script>
<html:base/>
</head>
<body>
<html:form action="/admin/savenews.do">
<table width="90%" align="center" >
<tr><td>ID</td><td>${newsBean.id }<html:hidden property="id" value="${newsBean.id }"/> </td></tr>
<tr><td>资讯大类</td><td><html:select property="bigclassid" size="1" onchange="getBigNewsClassSelected(this);">
                  <html:option value="0">请选择</html:option>
             <html:optionsCollection name="newsbclasslist" label="bcClassname" value="bcId"/>
        </html:select> </td></tr>
<tr><td>资讯小类</td><td><html:select property="smallclassid" size="1">
             <html:optionsCollection name="newssclasslist" label="scClassname" value="scId"/>
        </html:select> </td></tr>
<tr><td>资讯标题</td><td><html:text property="title" value="${newsBean.title }"></html:text> </td></tr>
<tr><td>资讯内容</td><td>
<FCK:editor id="content" basePath="/FCKeditor/" width="600" height="500" skinPath="/FCKeditor/editor/skins/silver/" toolbarSet = "Default">
${newsBean.content }</FCK:editor> 
</td></tr>
<tr><td>关键字</td><td><html:text property="keyword" value="${newsBean.keyword }"></html:text> </td></tr>
<tr><td>资讯作者</td><td><html:text property="writer" value="${newsBean.writer }"></html:text></td></tr>
<tr><td>资讯来源</td><td><html:text property="source" value="${newsBean.source }"></html:text></td></tr>
<tr><td>点击数</td><td><html:text property="hits" value="${newsBean.hits }"></html:text></td></tr>
<tr><td>添加时间</td><td>系统默认当前时间</td></tr>
<tr><td>发布人</td><td><html:text property="username" value="${newsBean.username }"></html:text></td></tr>
<tr><td>审核(0不是1是)</td><td>
<html:select property="sh">
<html:option value="0">没有</html:option>
<html:option value="1">有</html:option>
</html:select></td></tr>
<tr><td>省ID（不同省市分站读取总站新闻用）</td><td>${newsBean.prov.provId }</td></tr>
<tr><td>市ID（不同省市分站读取总站新闻用）</td><td>${newsBean.city.cityId }</td></tr>
<tr><td>推荐购物系统资讯(0否1推荐)</td><td>
<html:select property="shopIscommend">
<html:option value="0">没有</html:option>
<html:option value="1">有</html:option>
</html:select></td></tr>
<tr><td>是否购物系统资讯(0不是1是)</td><td>
<html:select property="shopFlag">
<html:option value="0">没有</html:option>
<html:option value="1">有</html:option>
</html:select></td></tr>
<tr><td>购物系统资讯是否图片新闻(0不是1是)</td><td>
<html:select property="shopIsImg">
<html:option value="0">没有</html:option>
<html:option value="1">有</html:option>
</html:select></td></tr>
<tr><td>购物系统资讯 是否头条(0不是1是)</td><td>
<html:select property="shopIsToptitle">
<html:option value="0">没有</html:option>
<html:option value="1">有</html:option>
</html:select></td></tr>
<tr><td>购物系统资讯 是否在购车集市区显示(0不是1是)</td><td>
<html:select property="shopISMarket">
<html:option value="0">没有</html:option>
<html:option value="1">有</html:option>
</html:select></td></tr>
<tr><td> <html:submit>提交</html:submit></td><td><html:reset>清空</html:reset> </td></tr>
</table>
</html:form>
</body>
</html:html>